Integrand size = 23, antiderivative size = 187 \[ \int (d \cos (e+f x))^m (a+b \tan (e+f x))^n \, dx=\frac {\operatorname {AppellF1}\left (1+n,\frac {2+m}{2},\frac {2+m}{2},2+n,\frac {a+b \tan (e+f x)}{a-\sqrt {-b^2}},\frac {a+b \tan (e+f x)}{a+\sqrt {-b^2}}\right ) \cos ^2(e+f x) (d \cos (e+f x))^m (a+b \tan (e+f x))^{1+n} \left (1-\frac {a+b \tan (e+f x)}{a-\sqrt {-b^2}}\right )^{\frac {2+m}{2}} \left (1-\frac {a+b \tan (e+f x)}{a+\sqrt {-b^2}}\right )^{\frac {2+m}{2}}}{b f (1+n)} \]
AppellF1(1+n,1+1/2*m,1+1/2*m,2+n,(a+b*tan(f*x+e))/(a-(-b^2)^(1/2)),(a+b*ta n(f*x+e))/(a+(-b^2)^(1/2)))*cos(f*x+e)^2*(d*cos(f*x+e))^m*(a+b*tan(f*x+e)) ^(1+n)*(1+(-a-b*tan(f*x+e))/(a-(-b^2)^(1/2)))^(1+1/2*m)*(1+(-a-b*tan(f*x+e ))/(a+(-b^2)^(1/2)))^(1+1/2*m)/b/f/(1+n)
Result contains complex when optimal does not.
Time = 23.41 (sec) , antiderivative size = 365, normalized size of antiderivative = 1.95 \[ \int (d \cos (e+f x))^m (a+b \tan (e+f x))^n \, dx=\frac {2 (a-i b) (a+i b) (2+n) \operatorname {AppellF1}\left (1+n,1+\frac {m}{2},1+\frac {m}{2},2+n,\frac {a+b \tan (e+f x)}{a-i b},\frac {a+b \tan (e+f x)}{a+i b}\right ) \cos (e+f x) (d \cos (e+f x))^m (a \cos (e+f x)+b \sin (e+f x)) (a+b \tan (e+f x))^n}{b f (1+n) \left (2 \left (a^2+b^2\right ) (2+n) \operatorname {AppellF1}\left (1+n,1+\frac {m}{2},1+\frac {m}{2},2+n,\frac {a+b \tan (e+f x)}{a-i b},\frac {a+b \tan (e+f x)}{a+i b}\right )+(2+m) \left ((a-i b) \operatorname {AppellF1}\left (2+n,1+\frac {m}{2},2+\frac {m}{2},3+n,\frac {a+b \tan (e+f x)}{a-i b},\frac {a+b \tan (e+f x)}{a+i b}\right )+(a+i b) \operatorname {AppellF1}\left (2+n,2+\frac {m}{2},1+\frac {m}{2},3+n,\frac {a+b \tan (e+f x)}{a-i b},\frac {a+b \tan (e+f x)}{a+i b}\right )\right ) (a+b \tan (e+f x))\right )} \]
(2*(a - I*b)*(a + I*b)*(2 + n)*AppellF1[1 + n, 1 + m/2, 1 + m/2, 2 + n, (a + b*Tan[e + f*x])/(a - I*b), (a + b*Tan[e + f*x])/(a + I*b)]*Cos[e + f*x] *(d*Cos[e + f*x])^m*(a*Cos[e + f*x] + b*Sin[e + f*x])*(a + b*Tan[e + f*x]) ^n)/(b*f*(1 + n)*(2*(a^2 + b^2)*(2 + n)*AppellF1[1 + n, 1 + m/2, 1 + m/2, 2 + n, (a + b*Tan[e + f*x])/(a - I*b), (a + b*Tan[e + f*x])/(a + I*b)] + ( 2 + m)*((a - I*b)*AppellF1[2 + n, 1 + m/2, 2 + m/2, 3 + n, (a + b*Tan[e + f*x])/(a - I*b), (a + b*Tan[e + f*x])/(a + I*b)] + (a + I*b)*AppellF1[2 + n, 2 + m/2, 1 + m/2, 3 + n, (a + b*Tan[e + f*x])/(a - I*b), (a + b*Tan[e + f*x])/(a + I*b)])*(a + b*Tan[e + f*x])))
Time = 0.50 (sec) , antiderivative size = 182, normalized size of antiderivative = 0.97, number of steps used = 6, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.217, Rules used = {3042, 3998, 3042, 3995, 150}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int (d \cos (e+f x))^m (a+b \tan (e+f x))^n \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int (d \cos (e+f x))^m (a+b \tan (e+f x))^ndx\) |
\(\Big \downarrow \) 3998 |
\(\displaystyle (d \cos (e+f x))^m (d \sec (e+f x))^m \int (d \sec (e+f x))^{-m} (a+b \tan (e+f x))^ndx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle (d \cos (e+f x))^m (d \sec (e+f x))^m \int (d \sec (e+f x))^{-m} (a+b \tan (e+f x))^ndx\) |
\(\Big \downarrow \) 3995 |
\(\displaystyle \frac {b (d \cos (e+f x))^m \left (1-\frac {a+b \tan (e+f x)}{a-\sqrt {-b^2}}\right )^{m/2} \left (1-\frac {a+b \tan (e+f x)}{a+\sqrt {-b^2}}\right )^{m/2} \int (a+b \tan (e+f x))^n \left (1-\frac {a+b \tan (e+f x)}{a-\sqrt {-b^2}}\right )^{-\frac {m}{2}-1} \left (1-\frac {a+b \tan (e+f x)}{a+\sqrt {-b^2}}\right )^{-\frac {m}{2}-1}d(a+b \tan (e+f x))}{f \left (a^2+b^2\right )}\) |
\(\Big \downarrow \) 150 |
\(\displaystyle \frac {b (d \cos (e+f x))^m \left (1-\frac {a+b \tan (e+f x)}{a-\sqrt {-b^2}}\right )^{m/2} \left (1-\frac {a+b \tan (e+f x)}{a+\sqrt {-b^2}}\right )^{m/2} (a+b \tan (e+f x))^{n+1} \operatorname {AppellF1}\left (n+1,\frac {m+2}{2},\frac {m+2}{2},n+2,\frac {a+b \tan (e+f x)}{a-\sqrt {-b^2}},\frac {a+b \tan (e+f x)}{a+\sqrt {-b^2}}\right )}{f (n+1) \left (a^2+b^2\right )}\) |
(b*AppellF1[1 + n, (2 + m)/2, (2 + m)/2, 2 + n, (a + b*Tan[e + f*x])/(a - Sqrt[-b^2]), (a + b*Tan[e + f*x])/(a + Sqrt[-b^2])]*(d*Cos[e + f*x])^m*(a + b*Tan[e + f*x])^(1 + n)*(1 - (a + b*Tan[e + f*x])/(a - Sqrt[-b^2]))^(m/2 )*(1 - (a + b*Tan[e + f*x])/(a + Sqrt[-b^2]))^(m/2))/((a^2 + b^2)*f*(1 + n ))
3.7.100.3.1 Defintions of rubi rules used
Int[((b_.)*(x_))^(m_)*((c_) + (d_.)*(x_))^(n_)*((e_) + (f_.)*(x_))^(p_), x_ ] :> Simp[c^n*e^p*((b*x)^(m + 1)/(b*(m + 1)))*AppellF1[m + 1, -n, -p, m + 2 , (-d)*(x/c), (-f)*(x/e)], x] /; FreeQ[{b, c, d, e, f, m, n, p}, x] && !In tegerQ[m] && !IntegerQ[n] && GtQ[c, 0] && (IntegerQ[p] || GtQ[e, 0])
Int[((d_.)*sec[(e_.) + (f_.)*(x_)])^(m_.)*((a_) + (b_.)*tan[(e_.) + (f_.)*( x_)])^(n_), x_Symbol] :> Simp[d^(2*IntPart[m/2])*(a^2 + b^2)^(IntPart[m/2] - 1)*((d*Sec[e + f*x])^(2*FracPart[m/2])/(f*b^(2*IntPart[m/2] - 1)*(1 - (a + b*Tan[e + f*x])/(a - Rt[-b^2, 2]))^FracPart[m/2]*(1 - (a + b*Tan[e + f*x] )/(a + Rt[-b^2, 2]))^FracPart[m/2])) Subst[Int[x^n*(1 - x/(a - Rt[-b^2, 2 ]))^(m/2 - 1)*(1 - x/(a + Rt[-b^2, 2]))^(m/2 - 1), x], x, a + b*Tan[e + f*x ]], x] /; FreeQ[{a, b, d, e, f, m, n}, x] && NeQ[a^2 + b^2, 0] && !Integer Q[m] && !IntegerQ[n]
Int[(cos[(e_.) + (f_.)*(x_)]*(d_.))^(m_)*((a_) + (b_.)*tan[(e_.) + (f_.)*(x _)])^(n_.), x_Symbol] :> Simp[(d*Cos[e + f*x])^m*(d*Sec[e + f*x])^m Int[( a + b*Tan[e + f*x])^n/(d*Sec[e + f*x])^m, x], x] /; FreeQ[{a, b, d, e, f, m , n}, x] && !IntegerQ[m]
\[\int \left (d \cos \left (f x +e \right )\right )^{m} \left (a +b \tan \left (f x +e \right )\right )^{n}d x\]
\[ \int (d \cos (e+f x))^m (a+b \tan (e+f x))^n \, dx=\int { \left (d \cos \left (f x + e\right )\right )^{m} {\left (b \tan \left (f x + e\right ) + a\right )}^{n} \,d x } \]
\[ \int (d \cos (e+f x))^m (a+b \tan (e+f x))^n \, dx=\int \left (d \cos {\left (e + f x \right )}\right )^{m} \left (a + b \tan {\left (e + f x \right )}\right )^{n}\, dx \]
\[ \int (d \cos (e+f x))^m (a+b \tan (e+f x))^n \, dx=\int { \left (d \cos \left (f x + e\right )\right )^{m} {\left (b \tan \left (f x + e\right ) + a\right )}^{n} \,d x } \]
\[ \int (d \cos (e+f x))^m (a+b \tan (e+f x))^n \, dx=\int { \left (d \cos \left (f x + e\right )\right )^{m} {\left (b \tan \left (f x + e\right ) + a\right )}^{n} \,d x } \]
Timed out. \[ \int (d \cos (e+f x))^m (a+b \tan (e+f x))^n \, dx=\int {\left (d\,\cos \left (e+f\,x\right )\right )}^m\,{\left (a+b\,\mathrm {tan}\left (e+f\,x\right )\right )}^n \,d x \]